Remote Access to ubuntu server

  • STEPS

    1. Installing VNC Server on Ubuntu

    Step 1: Connect to your Ubuntu server

    Ensure you have SSH access to your Ubuntu server. You can use tools like PuTTY (for Windows) or Terminal (for macOS/Linux) to connect remotely.

    Step 2: Update package list

    Run the following commands to update the package list:

    
    sudo apt update
    sudo apt upgrade
    
    Step 3: Install a desktop environment (if not already installed)

    If your server doesn’t have a desktop environment, install one. XFCE is a lightweight option:

    
    sudo apt install xfce4 xfce4-goodies
    
    Step 4: Install a VNC server

    Install a VNC server like TightVNC:

    
    sudo apt install tightvncserver
    
    Step 5: Start the VNC server

    Run the VNC server to set up a password and start a session:

    
    tightvncserver
    

    It will prompt you to set a password for VNC access. After setting the password, it will start a VNC server session.

    Step 6: Configure VNC server

    Stop the VNC server to configure it:

    
    tightvncserver -kill :1
    
    
    Edit the configuration file:
    
    nano ~/.vnc/xstartup
    
    Add the following lines at the end of the file:
    
    #!/bin/bash
    xrdb $HOME/.Xresources
    startxfce4 &
    
    
    Step 7: Restart the VNC server
    
    tightvncserver
    
    

    2. Accessing Ubuntu Server from a VNC Client

    To access the Ubuntu server from your local machine:

    1. Download a VNC client (e.g., RealVNC, TightVNC, TigerVNC) on your local computer. https://www.tightvnc.com/download.php

    2. Open the VNC client and enter the server's IP address followed by the VNC server port (default is :1).

    3. Enter the password you set earlier.